package com.mashang.stuManSystem.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class T1<T> {
    private Integer code;
    private String msg;
    private T rows;
    private long total;

    public static<T> T1<T> success(T rows, long total){
        return new T1<T>(200, "操作成功", rows, total);
    }
    public static<T> T1<T> error(){
        return new T1<T>(500, "操作失败", null, 0);
    }
}
